package org.hj.modules.act.util;

import org.activiti.engine.delegate.DelegateTask;
import org.activiti.engine.delegate.TaskListener;
import org.hj.common.util.SpringContextUtils;

import javax.servlet.http.HttpSession;

/**
 * 说明：指定下一任务待办人
 */
@SuppressWarnings("serial")
public class ManagerTaskHandler implements TaskListener {

	@Override
	public void notify(DelegateTask delegateTask) {
		HttpSession session = SpringContextUtils.getHttpServletRequest().getSession();
		//Session session = Jurisdiction.getSession();
		session.setAttribute("TASKID", delegateTask.getId());			//任务ID
		session.setAttribute("YAssignee", delegateTask.getAssignee());	//默认待办人
	}

}

